import { Component, OnInit, Input } from '@angular/core';

@Component({
    styleUrls: ['./index.scss'],
    selector: 'option-minute',
    template: `
        <div class="option-minute-container">
            <div class="flex left">
                <p class="title">{{option.title}}</p>
                <p class="content">{{option.description}}</p>
            </div>
            <div class="layout-row layout-align-center-center operation">
                <i class="material-icons icon" (click)="option.decreaseOperation()">remove_circle</i>
                <span class="timing">{{formateTiming(option.timing)}}</span>
                <i class="material-icons icon" (click)="option.increaseOperation()">add_circle</i>
            </div>
        </div>
    `
})
export class OptionMinute implements OnInit {
    @Input() option: any;

    constructor() { }

    ngOnInit() { }

    formateTiming(minute) {
        return minute + "分钟";
    }
}